<?
$validacion = $_GET["validacion"];
$datos = $_GET["datos"];
$datos = str_replace(" ", "*E*", $datos);
$datos = str_replace("/", "*B*", $datos);
$datos = str_replace(":", "*DP*", $datos);


$fp = fsockopen("www.datagro.com.ar", 80, $errno, $errstr, 30);
stream_set_blocking  ( $fp  , 0  );

if (!$fp) {
    die();
} else {
    $out = "GET /sucesos/recibir/" . $validacion . "/" . $datos . " HTTP/1.1\r\n";
    $out .= "Host: http://127.0.0.1/cake/datagro2\r\n";
    $out .= "Connection: Close\r\n\r\n";

    fwrite($fp, $out);
	echo "OK";
	flush();
    fclose($fp);
}
?>